package com.woniuxy02;

//一个.java源文件可以定义多个类，public修饰符的类只能有一个，和文件名相同的类才能是public
class Aaa{

    int x;
//    public Aaa(){
//        System.out.println("父类无参构造器");
//    }

    public Aaa(int x) {
        this.x = x;
        System.out.println("父类带参构造器");
    }
}

class Bbb extends Aaa{
    public Bbb(){
        super(0);
        System.out.println("子类类构造器");
    }
}

public class Test02 {
    public static void main(String[] args) {
        Bbb bbb = new Bbb();
    }
}
